package com.tingyuge.base.structrue.stack;

import java.util.Stack;

class Solution {

   public static   int[] nums = {3,3};
    public static int[] twoSum(int[] nums, int target) {
        for (int i = 0; i <nums.length ; i++) {
            int  a =   nums[i];
            for (int j = i+1; j <nums.length ; j++) {

                int b = nums[j];
                if((a+b)==target){
                    return new int[]{i,j};
                }
            }
        }
        return  null;
    }


    public static void main(String[] args) {
        int[] main = twoSum(nums,6);
        for (int i : main) {
            System.out.println(i);
        }
    }
}